$(function () {
    window.onload = function () {
        $.ajax({
            url: 'http://localhost:3000/useing/public',
            methode: 'get',
            success: function (res) {
                var str = '';
                $.each(res, function (index, item) {
                    str += "<li>" +
                        "<div class=xiangqing>" +
                        "<img src=" + item.img + ">" +
                        "<h4>" + item.text + "</h4>" +
                        "<div>" +
                        "<span class=sp>" + item.totalnum + "</span><span class= sp>" + item.num + "</span ></div>" +
                        "<span class=p>" + item.info_ty + "</span>" +
                        "<p class=p1><span>" + item.apply + "</span>申请</p>" +
                        "<p class=p3><span>" + item.uName + "</span><span>" + item.endTime
                        + "</span></p>" +
                        "</div>"
                })
                $(".zuixin ul").html(str);
            }
        })
    }
    $('.dg').children().mouseenter(function () {
        $(this).css('border-bottom', '3px solid red').show();
        $(this).children().css('color', 'red')

    })
    $('.dg').children().mouseleave(function () {
        $(this).css('border-bottom', 'none');
        $(this).children().css('color', '');

    })
    $('.list').children().mouseenter(function () {
        $(this).children().css('color', '#000')
    })
    $('.list').children().mouseleave(function () {
        $(this).children().css('color', '#d1cece');

    })
})